package com.lwj.dao;

import com.lwj.entity.Merchant;
import com.lwj.entity.Project;
import com.lwj.entity.User;
import com.lwj.model.UserProjectRes;

import java.util.List;

public interface ProjectMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Project record);

    int insertSelective(Project record);

    Project selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Project record);

    int updateByPrimaryKey(Project record);

    List<Project> getProject(Merchant merchant);

    List<UserProjectRes> getAllProject();

    /**
     * 根据类型获取项目
     * @param typeId
     * @return
     */
    List<Project> getProjectByType(int typeId);

    /**
     * 获取所有项目
     * @return
     */
    List<Project> findAll();

    /**
     * 获取用户的项目
     * @param user
     * @return
     */
    List<UserProjectRes>getUserProject(User user);
}